import Vue from 'vue'
import VueRouter from 'vue-router'  
import Login from '@/views/login/index.vue'
import Home from '@/views/home/index.vue'
import Areicle from '@/views/areicle/index.vue'
import Publish from '@/views/publish/index.vue'
import Layout from '@/views/layout/index.vue'


Vue.use(VueRouter)   

const routes=[{
    path:'/login',
    component:Login
},{
    path:'/',
    component:Layout,
    redirect:'/home',
    children:[{
        path:'/home',
        component:Home
    },{
        path:'/areicle',
        component:Areicle
    },{
        path:'/publish',
        component:Publish
    }]
}] 

const router=new VueRouter({
    routes
})   

export default router 